package org.sith.taskrunner.ejb.db.dao;

import java.util.List;

import org.sith.taskrunner.api.user.Role;
import org.sith.taskrunner.ejb.annotations.AllowedRoles;
import org.sith.taskrunner.ejb.db.entity.DBEntity;

public interface DefaultDAO<T extends DBEntity> {

    public T findById(Long id);

    public void removeById(Long id);

    public T saveOrUpdate(T t);

    public List<T> findAll();

    @AllowedRoles(Role.SYSTEM)
    void removeAll();

}
